﻿@using DirectSell.Model.Money
@using Webdiyer.WebControls.Mvc;
@model  PagedList<Consumption>

<div class="table-responsive">
    @if (Model.Count > 0)
    {
        <table class="table table-bordered table-striped">
            <tr>
                <th>序号</th>
                <th>日期</th>
                <th>类型</th>
                <th>相关会员</th>
                <th>说明</th>
                <th>金额</th>
            </tr>
            @{ int i = 0;}
            @foreach (var item in Model)
            {

            <tr>
                <td>@(Model.StartItemIndex + i++)</td>
                <td>@item.CreateDate</td>
                @switch (item.LogType)
                {
                    case 0:
                        <td><p style="color:palevioletred">支出</p></td>; break;
                    case 1:
                        <td><p style="color:blue">收入</p></td>; break;
                }
                <td>@item.Relevant</td>
                <td>@item.Affair</td>
                <th>@item.Amout  </th>
            </tr>
            }
        </table>
    }

    else
    {
        <table class="table table-bordered table-striped">
            <tr>

                <th>信息</th>
            </tr>
            <tr><td>暂无相关数据</td></tr>
        </table>
    }
</div>
